package com.mgkj.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * @author : ssy
 * @date: 2024-02-26
 * @Description:
 */
@Data
@Builder
@Api(tags = "工单Dto")
public class MOCTGDto {

    @ApiModelProperty(value = "单别", required = true)
    @NotBlank(message = "单别不能为空")
    @JsonProperty("TG001")
    private String TG001;

    @ApiModelProperty(value = "单号",required = true)
    @NotBlank(message = "单号不能为空")
    @JsonProperty("TG002")
    private String TG002;

    @ApiModelProperty(value = "序号",required = true)
    @NotBlank(message = "序号不能为空")
    @JsonProperty("TG003")
    private String TG003;

    @ApiModelProperty(value = "产品品号",required = true)
    @NotBlank(message = "产品品号不能为空")
    @JsonProperty("TG004")
    private String TG004;

    @ApiModelProperty(value = "单位",required = true)
    @NotBlank(message = "单位不能为空")
    @JsonProperty("TG007")
    private String TG007;

    @ApiModelProperty(value = "入/出别",required = true)
    @NotBlank(message = "入/出别不能为空")
    @JsonProperty("TG009")
    private Double TG009;

    @ApiModelProperty(value = "仓库",required = true)
    @NotBlank(message = "仓库不能为空")
    @JsonProperty("TG010")
    private String TG010;

    @ApiModelProperty(value = "入库数量",required = true)
    @DecimalMin(value = "0.01",message = "入库数量不许小于0")
    @JsonProperty("TG011")
    private Double TG011;

    @ApiModelProperty(value = "验收数量",required = true)
    @DecimalMin(value = "0.01",message = "验收数量不许小于0")
    @JsonProperty("TG013")
    private Double TG013;

    @ApiModelProperty(value = "工单单别",required = true)
    @NotBlank(message = "工单单别不能为空")
    @JsonProperty("TG014")
    private String TG014;

    @ApiModelProperty(value = "工单单号",required = true)
    @NotBlank(message = "工单单号不能为空")
    @JsonProperty("TG015")
    private String TG015;

    @ApiModelProperty(value = "检验状态",required = true)
    @NotBlank(message = "检验状态不能为空")
    @JsonProperty("TG016")
    private String TG016;

    @ApiModelProperty(value = "批号",required = true)
    @NotBlank(message = "批号")
    @JsonProperty("TG017")
    private String TG017;

    @ApiModelProperty(value = "审核码",required = true)
    @Pattern(regexp = "^[NY]$",message = "审核码只允许输入N|Y")
    @JsonProperty("TG022")
    private String TG022;

    @ApiModelProperty(value = "备注")
    @JsonProperty("TG020")
    private String TG020;

    @ApiModelProperty(value = "库位和对应的验收数量")
    private List<KWAndNum> kwInfo;

    private String TG036;
    private String creator;
    private String company;
    private String usrGroup;
    private String insertMoDate;

}
